//
//  ExploitSelectionButton.swift
//  Taurine
//
//  Created by CoolStar on 8/20/23.
//  Note from CoolStar: I'm retired from jailbreaking. But if I gotta do one last release to do it right, so be it.
//

import Foundation

class ExploitSelectionButton: SelectionButton {
    override func awakeFromNib() {
        super.awakeFromNib()
        
        guard defaultsKey == "exploit" else {
            fatalError("exploit selection key must be exploit")
        }
        
        self.isEnabled = ExploitManager.shared.availableExploits.contains { $0.prefName == defaultsValue }
    }
}
